package com.huawei.xme.ch02.t14.teacher;

/**
 * @author 黄后林
 * @date 2022-10-26 17:41:17
 * @note 程序员是用代码喂出来的
 */
public class Task02 {

    public static void main(String[] args) {

        System.out.println(xx(1000));

    }

    public static double xx(int n){

        double sum  =0;
        for(int num=1; num<n;num++){
            if( num%3==0 && num%7 ==0){
                sum = sum +num;
            }
        }

        return Math.sqrt(sum);

    }
}
